<?php if(!IS_AJAX){?>
  <ul class="ajaxdatalist activity-list" style="min-height:1000px;" id="ajaxdatalistbox">
    <?php }?>
    <volist name="list" id="vo">
        <li id="ajaxdatalistbox-{$vo.id}" class="" reurl="" rel="{:U('Member/select')}" width="500" title="动态">
            <div class="avatar">
                <p style="position: absolute;margin-top: 55px;width: 50px;text-align: center;">{$vo.membername}
                </p>
                <img src="<empty name="vo['headimg']">__PUBLIC__/timg.jpg<else/>{$vo.headimg}</empty>" alt="" style="-webkit-border-radius:0 !important">
            </div>
            <div class="activity-desk">
                <span class="arrow"></span>
                <span class="arrowfff"></span>
                <h5><span>{$vo.title}</span></h5>
                <h5><span>{$vo.content}</span></h5>
                <p class="text-muted emojitext" style="word-wrap: break-word;">{:replacebr(outemoji($vo['remark']))}</p>
                <div class="album" style="margin-bottom:10px;">
                    <volist name="vo['images']" id="img">
                        <notempty name="img">
                          <img width="150" height="150" alt="{:outemoji($vo['remark'])}" class="img-thumbnail" src="{:getThumbPath($img)}" style="border:none !important;">
                          </notempty>
                    </volist>
                    <div class="clearfix"></div>
                </div>
                <div style="background:#fafafa; padding:10px;">
                <p class="text-muted">
                     <span style="color:#999;">{:getEvaluateTime($vo['datetime'])}</span>&nbsp;&nbsp;
                    <a href="##"><i class="fa icon-thumbs-o-up likebtn{$vo.id}" style="color:#6f6e76;"> <span style="color:#999999;">赞 (<span id="likecountbox{$vo.id}">{$vo.likecount}</span>)</span></i></a>
                    &nbsp;&nbsp;
                    <a href="##" id="p-text-area-btn-{$vo.id}"><i class="fa icon-comments-o" style="color:#6f6e76;"> <span style="color:#999999;">评论 ({$vo.evcount})</span></i></a>
                    <eq name="giveintegral" value="true">
                    &nbsp;&nbsp;
                    <a href="##" onClick="_openWindow('{:U('Info/giveintegral', array('info_id' => $vo['id'],'member_id' => $vo['member_id']))}', 500, '奖赏', '提交', function(){ $('#ajaxdatalistboxform').submit();}, '');" id="p-money-area-btn-{$vo.id}"><i class="fa icon-money text-danger"> 奖票{$vo.tiketcount}张，奖分{$vo.integralcount}次</i></a>
                    &nbsp;&nbsp;
                    </eq>
                    <eq name="vo['member_id']" value="$memberInfo['id']">&nbsp;&nbsp;&nbsp;<a data-id="{$vo.id}" class="deleteBtn" rel="{:U('Info/delete', array('id' => $vo['id']))}" href="javascript:void(0);">删除</a></eq>
                </p>
                <hr style="margin-bottom: 10px;">
                <div class="panel" id="p-text-area<php>echo $vo['id'];</php>" style="display:none;">
                    <form style="position:relative;" action="{:U('Info/insert')}" class="p-text-area{$vo.id}" id="p-text-area{$vo.id}" onSubmit="return false;">
                        <input type="hidden" name="pid" value="{$vo.id}">
                        <p class="lead emoji-picker-container">
                            <textarea class="form-control textarea-control" rows="3" placeholder="发表评论" data-emojiable="true" name="remark"></textarea>
                        </p>
                    </form>
                    <footer class="" style="padding:0; border-top:none;">
                        <button onClick="submitform{$vo.id}();" class="btn btn-post pull-right" style="border:none; border-radius:0;">发表</button>
                    <script>
                        $('#p-text-area-btn-<php>echo $vo['id'];</php>').click(function(e) {
                           if($('#p-text-area<php>echo $vo['id'];</php>').css('display') == 'none'){
                               $('#p-text-area<php>echo $vo['id'];</php>').show();
                              }else{
                                  $('#p-text-area<php>echo $vo['id'];</php>').hide(100);
                                 }
                        });
                        //点赞
                        $('#likeBox{$vo.id}').ajaxlist({autoload:0, nodata : ''});
                        $('.likebtn{$vo.id}').click(function(e) {
                            $.get('{:U('Info/like')}', {id:
                            <?php echo $vo['id'];?>
                            }, function(data){
                                if(data.status == 1){
                                    $('#likecountbox{$vo.id}').html(data.data);
                                    $('#likeBox{$vo.id}form').submit();
                                }else{
                                    $.ThinkBox.error(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});

                                }

                            }, 'json');
                        });
                            function submitform{$vo.id}(){
                                var data = $('.p-text-area{$vo.id}').eq(0).serialize();
                                $.ajax({
                                    url : $('.p-text-area{$vo.id}').eq(0).attr('action'),
                                    data:data,
                                    type:'POST',
                                    dataType:"json",
                                    success: function(data){
                                        $('.p-text-area{$vo.id}').eq(0).find('[name="remark"]').val('');
                                        $('.p-text-area{$vo.id}').eq(0).find('[name="remark"]').next('div').html('');
                                        if(data.status == 1){
                                            $('.blog-cmnt{$vo.id}form').trigger('submit');
                                            $.ThinkBox.success(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
                                        }else{
                                            $.ThinkBox.error(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
                                        }
                                    }
                                });
                            }
                     </script>
                        <ul class="nav nav-pills p-option">
                            <!--<li>
                                <a href="##">@</a>
                            </li>
                            <li>
                                <a href="##"><i class="fa icon-camera"></i></a>
                            </li>-->
                        </ul>
                    </footer>
                </div>
                <div class="clearfix"></div>
                <div id="likeBox{$vo.id}">
                    <if condition="vo.likeList eq 0"><else /><i class="fa fa-thumbs-o-up zan"></i></if>
                    <volist name="vo['likeList']" id="like">
                        <a href="#" style="margin-right:4px;">
                            <img src="<empty name="like['headimg']">__PUBLIC__/timg.jpg<else/>{$like.headimg}</empty>" width="30">
                        </a>
                    </volist>
                </div>
                <div id="likeBox{$vo.id}pages"></div>
                <form action="{:U('Info/likeList', array('info_id' => $vo['id']))}" id="likeBox{$vo.id}form"></form>
                  <div class="blog-cmnt{$vo.id} blog-cmnt-list" rel="{:U('cmntList', array('pid' => $vo['id']))}" id="blog-cmnt{$vo.id}"> <!--sub#{$vo.id}--> </div>
                  <div id="blog-cmnt{$vo.id}pages" class="pages PagesBox"></div>
                <form action="{:U('cmntList', array('pid' => $vo['id']))}" class="blog-cmnt{$vo.id}form" id="blog-cmnt{$vo.id}form"></form>
</div>
                </div>
            </li>
      </volist>
    <?php if(!IS_AJAX){?>
  </ul>
    <div class="PagesBox" id="ajaxdatalistboxpages"><?php echo $pages;?></div>
    <form action="<?php echo U('Info/index');?>" id="ajaxdatalistboxform"><?php echo(isset($_GET['member_id'])?'<input type="hidden" name="member_id" value="'.$_GET['member_id'].'"/>':'') ?></form>
<script>
    $('#ajaxdatalistbox').ajaxlist({append:true,success:function(){
		window.emojiPicker = new EmojiPicker({
			emojiable_selector: '[data-emojiable=true]',
			assetsPath: '__PUBLIC__/Intesys/AdminX/js/EmojiPicker/lib/img/',
			popupButtonClasses: 'fa icon-smile-o',
			iconSize : 26
		});
        window.emojiPicker.discover();
		 $('.blog-cmnt-list').each(function(index, element) {
			$(this).removeClass('blog-cmnt-list');
            $(this).ajaxlist({append:true, nodata:'<p style="text-align:center">暂无评论</p>',loadmore:'<a href="#link#">点击查看更多评论</a>',loadmorenodata:'<p style="color:#ccc;">已经显示所有评论</p>',success:function(){
				$('.emojitext').each(function(index, element) {
					$(this).remove('emojitext');
                    $(this).html(window.emojiPicker.unicodeToImage($(this).html()));
                });
				//评论加载完之后转换表情符号
				window.emojiPicker.discover();
			}});
         });
		 $('.blog-cmnt-list').each(function(index, element) {
			$(this).removeClass('blog-cmnt-list');
            $(this).ajaxlist({append:true,success:function(){
			}});
        });
	}});
</script>
<style>
.activity-list li .activity-desk .form-control{color:#999; border-radius:0; background:#EDEDED;}
.nav.nav-pills.p-option li{display:inline-block; width:auto; margin:0 5px; padding-bottom:0; border-bottom:none;}
.activity-list li .activity-desk h5{line-height:1.75em;}
    .activity-list li .activity-desk{background:#fff; padding:10px; position:relative; border-radius:4px; box-shadow:1px 1px 5px #ccc; border:1px solid #ccc;}
	.activity-list li .activity-desk .arrow{
    border-bottom: 8px solid transparent;
    border-top: 8px solid transparent;
    display: block;
    height: 0;
    left: -7px;
    position: absolute;
    top: 30px;
    margin-top: -10px;
    width: 0;
	border-right:8px solid #fff;}
.text-muted a{color:#999;}
.activity-list li .pages li{padding:0; margin:0; width:auto; border:none;}
.blog-cmnt .media-heading a{color:#7593ad; font-size:12px;}
.blog-cmnt .media-heading, .blog-cmnt .media-heading a{color:#7593ad !important;}
</style>
<?php }?>